import { createSlice } from "@reduxjs/toolkit";

const goodsSlice = createSlice({
    name: 'goods-slice',
    initialState: {
        name: 'apple',
        price: 100
    },
    reducers: {
        setName(state, action) {
            state.name = action.payload
        },
        setPrice(state, action) {
            state.price = action.payload
        }
    }
})

export default goodsSlice